PPostEvent
EvQElPtr *qElPtr ; receives address of a queue element pointer
returns 0= noErr, 1=evtNotEnb
event queue) except that it returns, via its third parameter, the physical
address of the stored queue element. This provides access so you can modify the
contents of that element.
eventWhat specifies which type of event should be posted. It should be one of
eventMsg specifies the value to be placed in the message field of the
EventRecord. It should correspond in type to the meaning of eventWhat.
qElPtr is the address of an EvQElPtr. Upon return, it contains the address
of a 22-byte evQEl structure. See Notes, below for an example of
how to access that record.
noErr (0) worked without error
evtNotEnb (1) eventWhat is currently disabled. See SetEventMask
Notes: The less-flexible PostEvent function lets you specify values for only two changing the where, when, and modifiers fields. For instance, you could use PPostEvent to enqueue a command-key shifted mouseDown event with selected coordinates as follows:
myQElPtr->evtQModifiers = cmdKey;
SetPt( &(myQElPtr->evtQWhere), 100,100); See EvQEl for the layout of event queue elements. It is also possible to build a queue element from scratch and use En queue
to insert it into the event queue. See GetEvQHdr.